#pragma once
#include <opencv2/opencv.hpp>
#include <string>
#include <sys/socket.h>
#include "main.h"
using namespace cv;
using namespace std;

extern bool bDetecting;     // 目标检测进程状态
extern int idxOutputImage;  // image index of input video

extern mutex mtxQueueInput_client;
extern queue<pair<int, Mat>> queueInput_client;
extern mutex mtxQueueShow;
extern priority_queue<imageout_idx, vector<imageout_idx>, paircomp> queueShow;  // display queue 目标追踪输入队列

void reduction_size(vector<detection> &dets_perframe,cv::Mat &img,float scale,
                    detection* dets, int nboxes_left,float thresh);
void get_detections(int cpuid, int sock_tcp[]);
int draw_image(cv::Mat img,float scale,detection* dets,int total,float thresh); //画图函数